home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0219_Calling Netscape Navigator.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-03-04  |  632 b   |  30 lines

  1.  
  2. program Netscape;
  3.  
  4. uses DDEMan;
  5.  
  6. procedure GotoURL( sURL : string );
  7. var
  8. dde : TDDEClientConv;
  9. begin
  10. dde   := TDDEClientConv.Create( nil );
  11. with dde do
  12.   begin
  13.      // specify the location of netscape.exe
  14.      ServiceApplication :='c:\ns32\program\netscape.exe';
  15.      // activate the Netscape Navigator
  16.      SetLink( 'Netscape', 'WWW_Activate' );
  17.      RequestData('0xFFFFFFFF');
  18.      // go to the specified URL
  19.      SetLink( 'Netscape', 'WWW_OpenURL' );
  20.      RequestData(sURL+',,0xFFFFFFFF,0x3,,,' );
  21.      // ...
  22.      CloseLink;
  23.   end;
  24. dde.Free;
  25. end;
  26.  
  27. begin
  28. GotoURL('http://www.whatever.com/' );
  29. end.
  30.